During daily application, a browser usually has an original built-in video player. When detecting a video playing requirement, the browser calls the built-in video player by default to play a video. However, because users have different interests, or have different requirements on functions of video players, the browser needs to call a non-built-in video player to play a video.
In the existing technology, when page loading of a browser is finished, Javascript (JS) code is injected, and a timer is enabled in the JS, to search for and modify a video label in a page. When the video label is found, a video playing process in the page is modified, to call a non-built-in video player.
In a Hypertext Markup Language (HTML) 5 web page, there are various page loading cases, for example, a non-refresh web page loading event, that is, a user clicks a new video in a player. In this case, not all of entire content in the web page is refreshed, and only a small quantity of elements such as a video label are updated, causing that an event of injecting JS cannot be triggered. Consequently, a non-built-in video player cannot be called to play a video.